$(function() {
  $("#button").click(function(evt) {
    evt.preventDefault()   // make sure the hyperlink doesn't work per se
    $.ajax( {
      type: "GET",
      url: "GetBook",
      data: { id: $("#sel").val() },
      dataType: "json",
      success: function(data) {
        $("#out").css("visibility","visible")
        $("#title").html(data.title)
        $("#type").html(data.type)
        $("#qty").html(data.qty)
        $("#comments").html(data.comments)
      }
    } )
  })
})
